package com.vt.admin.api.dto.user;

import com.vt.admin.api.entity.SysUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 提供前端 vue 的用户结构
 *
 * @Auther: PanZha
 * @Date: 2018/10/24 18:46
 */
@Data
@Accessors(chain = true)
public class VueUserInfo {

    @ApiModelProperty("用户id")
    private String userId;

    @ApiModelProperty("用户名")
    private String account;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("是否冻结（0-禁用，1-启用）")
    private Integer userStatus;

    public VueUserInfo(SysUser user) {
        this.userId = user.getId();
        this.account = user.getAccount();
        this.name = user.getName();
        this.userStatus = user.getUserStatus();
    }

    public VueUserInfo(){}
}
